package com.example.testproject.network;


import com.example.testproject.annotaions.TestAnnotation;
import com.example.testproject.bean.WanAndroidBean2;

import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.HTTP;
import retrofit2.http.Path;
import rx.Observable;

/**
 * @ClassName: NetWorkApi
 * @Author: android 超级兵
 * @CreateDate: 12/23/21$ 3:07 PM$
 * TODO
 */
public interface NetWorkApi {
    String url = "https://www.wanandroid.com/";

    @GET("article/list/{position}/json")
    Call<ResponseBody> getHomeData(@Path("position") String position);

    @GET("article/list/{position}/json")
    Call<WanAndroidBean2> getHomeData2(@Path("position") String position);

    //@GET("article/list/{position}/json")
    @HTTP(method = "GET", path = "article/list/{position}/json")
    @TestAnnotation("测试的注解")
    Observable<WanAndroidBean2> getHomeData3(@Path("position") String position);
}

